package archer.framework.security.token.filter;

import archer.framework.security.utils.TokenUtils;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author christ
 * @date 2016/5/10
 */
public class TokenTouchFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

        TokenUtils.touchToken();

        filterChain.doFilter(servletRequest, servletResponse);
    }

    @Override
    public void destroy() {

    }
}
